Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Spring Boot Interview Questions and Answers

Question: How can you set active profile in Spring Boot?
Answer:
Follow the following methods to set an active profile in Spring Boot.
  • Pass this profile as an argument when you launch the Spring Boot application (java -jar -Dspring.profiles.active=dev Sample-1.0-SNAPSHOT.jar).
  • Set active the active profile in application.properties file (spring.profiles.active=dev).
Is it helpful? Yes No

Most helpful rated by users:

©2024 WithoutBook